import { Layout, Menu } from 'antd';
import React, { Component } from 'react'
import { Link } from 'react-router-dom'
import { HomeOutlined, SmileOutlined } from '@ant-design/icons';
import './index.css'
const { Sider } = Layout
export default class Siderpart extends Component {
  render() {
    return (
      <Sider
        breakpoint="lg"
        collapsedWidth="0"
      >
        <div className="logobox" >
          <img className="logopic" src="https://ss.im5i.com/2021/08/21/d4HAD.png" alt="头像" />
          <p className="name">神码人React Project</p>
        </div>
        <Menu theme="dark" mode="inline" defaultSelectedKeys={['1']}>
          <Menu.Item key="1">
            < HomeOutlined />
            <span><Link to="/home"/>文章列表</span>
          </Menu.Item>
          <Menu.Item key="2">
            <SmileOutlined />
            <span><Link to="/about"/>关于</span>
          </Menu.Item>
        </Menu>
      </Sider>
    )
  }
}
